package com.superboboge.controller;

/*import com.alibaba.dubbo.config.annotation.Reference;
import com.alibaba.fastjson.JSON;
import com.lianpay.merchant.back.service.api.PayeeKycCheckService;
import com.lianpay.merchant.back.service.api.PayeeRegisterService;
import com.lianpay.merchant.back.service.api.constant.FundsType;
import com.lianpay.merchant.back.service.api.constant.PayeeIdType;
import com.lianpay.merchant.back.service.api.constant.PayeeType;
import com.lianpay.merchant.back.service.api.dto.PayeeKycCheckDTO;
import com.lianpay.merchant.back.service.api.dto.PayeeRegisterDTO;
import com.lianpay.merchant.back.service.api.req.PayeeKycCheckReq;
import com.lianpay.merchant.back.service.api.req.PayeeRegisterReq;
import com.lianpay.merchant.back.service.api.response.DataResp;
import com.lianpay.trust.domain.AuthInfo;
import com.lianpay.trust.dubbo.service.PersonalAuthService;*/
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
/*import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;*/

@Controller
@RequestMapping("/")
public class TestDubboController {

/*    @Reference
    PersonalAuthService personalAuthService;
    @Reference
    PayeeKycCheckService payeeKycCheckService;
    @Reference
    PayeeRegisterService payeeRegisterService;


    @RequestMapping("/index")
    public String index(Map<String, Object> map){
        map.put("user", "ddd");
        return "index";
    }

    @ResponseBody
    @RequestMapping("/testDubbo")
    public String testdubbo(Map<String, Object> map){
        AuthInfo authInfo = new AuthInfo();
        authInfo.setIdCard("330108199102030213");
        authInfo.setNameCard("戚海");
        authInfo.setFlag("1");
        authInfo.setOidChnl("common_merchant_back");
        authInfo.setTraderNo("555444");
        AuthInfo authInfo1 = personalAuthService.realAuth(authInfo);
        return JSON.toJSONString(authInfo1);
    }

    @ResponseBody
    @RequestMapping("/register")
    public String register(Map<String, Object> map){


//        PayeeRegisterReq registerReq = new PayeeRegisterReq();
//        registerReq.setMerchantId("321321321");
//        registerReq.setPayeeIdNo("330108199101120022");
//        registerReq.setPayeeIdType(PayeeIdType.ID_CARD);
//        registerReq.setPayeeName("王思思");
//        registerReq.setPayeeType(PayeeType.PERSONAL);
//        DataResp<PayeeRegisterDTO> dtoDataResp = payeeRegisterService.register(registerReq);

        PayeeRegisterReq registerReq = new PayeeRegisterReq();
        registerReq.setMerchantId("22222");
        registerReq.setPayeeIdNo("123123123MA2");
        registerReq.setPayeeIdType(PayeeIdType.ORGANIZATION_CODE);
        registerReq.setPayeeName("博世集团");
        registerReq.setPayeeType(PayeeType.CORPORATE);
        registerReq.setFundsType(FundsType.B2B);
        DataResp<PayeeRegisterDTO> dtoDataResp = payeeRegisterService.register(registerReq);


        PayeeRegisterDTO payeeRegisterDTO = dtoDataResp.getDataResult();
        return JSON.toJSONString(dtoDataResp);
    }

    @ResponseBody
    @RequestMapping("/kyc")
    public String kyc(Map<String, Object> map){
        PayeeKycCheckReq payeeKycCheckReq = new PayeeKycCheckReq();
        payeeKycCheckReq.setPayeeId(1801172208192901l);
        payeeKycCheckReq.setMerchantId("111111");
        payeeKycCheckReq.setPayeeIdNo("123123123MA1");
        payeeKycCheckReq.setPayeeName("alimama");
        payeeKycCheckReq.setPayeeType(PayeeType.CORPORATE);
        payeeKycCheckReq.setPayeeIdType(PayeeIdType.ORGANIZATION_CODE);

//        PayeeKycCheckReq payeeKycCheckReq = new PayeeKycCheckReq();
//        payeeKycCheckReq.setPayeeId(1801172208192901l);
//        payeeKycCheckReq.setMerchantId("1111111111");
//        payeeKycCheckReq.setPayeeIdNo("330108199101120022");
//        payeeKycCheckReq.setPayeeName("王思思");
//        payeeKycCheckReq.setPayeeType(PayeeType.PERSONAL);
//        payeeKycCheckReq.setPayeeIdType(PayeeIdType.ID_CARD);
        DataResp<PayeeKycCheckDTO> dataResp =payeeKycCheckService.applyCheckKyc(payeeKycCheckReq);
        return JSON.toJSONString(dataResp);
    }*/

}
